/*
******************
* author: 马丰彦
* date: 2019-07-22
* function: 优惠策略api请求
******************
*/

import request from '@/utils/request'

// 请求优惠策略列表
export function getList(data) {
  return request({
    url: '/preferentialTariff/manage.do',
    // url: 'http:///app-api/preferentialTariff/manage.do',
    // url: 'http://192.168.9.210:30068/preferentialTariff/manage.do',
    method: 'post',
    data
  })
}

// 选择触发条件下拉框请求
export function getCondition(data) {
  return request({
    url: '/preferentialTariff/triggeringConditionsList.do',
    method: 'post',
    data
  })
}

// 选择优惠形式下拉框请求
export function getShape(data) {
  return request({
    url: '/preferentialTariff/preferentialTypeList.do',
    method: 'post',
    data
  })
}

// 得到策略详情
export function getdetail(data) {
  return request({
    url: '/preferentialTariff/queryDetails.do',
    method: 'post',
    data
  })
}

// 校验策略名称是否重复
export function checkName(data) {
  return request({
    url: '/preferentialTariff/checkName.do',
    method: 'post',
    data
  })
}

// 保存策略方案
export function saveShape(data) {
  return request({
    url: '/preferentialTariff/save.do',
    method: 'post',
    data
  })
}
